package com.douqu.game.core.entity.ext.data.challenge;

import com.bean.core.buffer.ByteBuffer;
import com.douqu.game.core.entity.EntityObject;

/**
 * @author: miracle.
 * Description:
 * Date: 2018/6/22 0022 下午 7:25
 * Huan Yu Copyright (c) 2017 All Rights Reserved.
 */
public class WorldMapKillBean extends EntityObject {

    /** 单次最高积分 */
    private int maxValue;

    /** 总积分 */
    private int totalValue;

    /** 连杀数 */
    private int skills;

    /** 不实用道具连杀数 */
    private int noPropSkills;

    /** 不使用道具最高积分 */
    private int noPropMaxValue;

    public void writeTo(ByteBuffer buffer){
        buffer.writeInt(maxValue);
        buffer.writeInt(totalValue);
        buffer.writeShort(skills);
        buffer.writeShort(noPropSkills);
        buffer.writeInt(noPropMaxValue);
    }

    public void loadFrom(ByteBuffer buffer){
        maxValue = buffer.readInt();
        totalValue = buffer.readInt();
        skills = buffer.readShort();
        noPropSkills = buffer.readShort();
        noPropMaxValue = buffer.readInt();
    }

    public int getNoPropSkills() {
        return noPropSkills;
    }

    public void setNoPropSkills(int noPropSkills) {
        this.noPropSkills = noPropSkills;
    }

    public int getNoPropMaxValue() {
        return noPropMaxValue;
    }

    public void setNoPropMaxValue(int noPropMaxValue) {
        this.noPropMaxValue = noPropMaxValue;
    }

    public int getMaxValue() {
        return maxValue;
    }

    public void setMaxValue(int maxValue) {
        this.maxValue = maxValue;
    }

    public int getTotalValue() {
        return totalValue;
    }

    public void setTotalValue(int totalValue) {
        this.totalValue = totalValue;
    }

    public int getSkills() {
        return skills;
    }

    public void setSkills(int skills) {
        this.skills = skills;
    }

    public void addTotal(int value){
        totalValue += value;
    }
}
